import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import MovieNav from '@/components/sd/MovieNav.vue';
import BaiduMap from 'vue-baidu-map';

Vue.component('MovieNav', MovieNav);

// 引入vant组件
import Vant from 'vant';
import 'vant/lib/index.css';

Vue.use(Vant);

//引入mock
require('./mock/whs');
require('./mock/sd');
require('./mock/wyw');
require('./mock/xqh');
require('./mock/ldy');

//引入echart
// import echarts from 'echarts'
let echarts = require('echarts');
Vue.prototype.$echarts = echarts;

//全局过滤器
Vue.filter('fliterImg', function(val) {
    return val.replace('/w.h/', '/170.230/');
});

//全局注册组件
import FooterIndex from '@/components/whs/footer-index.vue';
import HeaderIndex from '@/components/whs/header-index.vue';
Vue.component('FooterIndex', FooterIndex);
Vue.component('HeaderIndex', HeaderIndex);

import 'nprogress/nprogress.css';

Vue.config.productionTip = false;
Vue.prototype.$bus = new Vue();

Vue.use(BaiduMap, {
    // ak 是在百度地图开发者平台申请的密钥 详见 http://lbsyun.baidu.com/apiconsole/key */
    ak: '41ZIrHqrWgwHAQeKelFGQ1Se91kwUxlS',
});
new Vue({
    router,
    store,
    render: h => h(App),
}).$mount('#app');